Optimal. Leaf size=88 \[ \frac{(3 a A-b B) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac{\sec ^4(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{4 d}+\frac{(3 a A-b B) \tan (c+d x) \sec (c+d x)}{8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0897351, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {2837, 778, 199, 206} \[ \frac{(3 a A-b B) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac{\sec ^4(c+d x) ((a A+b B) \sin (c+d x)+a B+A b)}{4 d}+\frac{(3 a A-b B) \tan (c+d x) \sec (c+d x)}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2837
Rule 778
Rule 199
Rule 206
Rubi steps
\begin{align*} \int \sec ^5(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac{b^5 \operatorname{Subst}\left (\int \frac{(a+x) \left (A+\frac{B x}{b}\right )}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{\sec ^4(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{4 d}+\frac{\left (b^3 (3 a A-b B)\right ) \operatorname{Subst}\left (\int \frac{1}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac{\sec ^4(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{4 d}+\frac{(3 a A-b B) \sec (c+d x) \tan (c+d x)}{8 d}+\frac{(b (3 a A-b B)) \operatorname{Subst}\left (\int \frac{1}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 d}\\ &=\frac{(3 a A-b B) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac{\sec ^4(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{4 d}+\frac{(3 a A-b B) \sec (c+d x) \tan (c+d x)}{8 d}\\ \end{align*}
Mathematica [A] time = 0.55725, size = 82, normalized size = 0.93 \[ \frac{\sec ^4(c+d x) \left ((b B-3 a A) \sin ^3(c+d x)+(5 a A+b B) \sin (c+d x)+(3 a A-b B) \cos ^4(c+d x) \tanh ^{-1}(\sin (c+d x))+2 (a B+A b)\right )}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.08, size = 173, normalized size = 2. \begin{align*}{\frac{A\tan \left ( dx+c \right ) a \left ( \sec \left ( dx+c \right ) \right ) ^{3}}{4\,d}}+{\frac{3\,aA\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{8\,d}}+{\frac{3\,aA\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{8\,d}}+{\frac{aB}{4\,d \left ( \cos \left ( dx+c \right ) \right ) ^{4}}}+{\frac{Ab}{4\,d \left ( \cos \left ( dx+c \right ) \right ) ^{4}}}+{\frac{B \left ( \sin \left ( dx+c \right ) \right ) ^{3}b}{4\,d \left ( \cos \left ( dx+c \right ) \right ) ^{4}}}+{\frac{B \left ( \sin \left ( dx+c \right ) \right ) ^{3}b}{8\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{Bb\sin \left ( dx+c \right ) }{8\,d}}-{\frac{Bb\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{8\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.985599, size = 151, normalized size = 1.72 \begin{align*} \frac{{\left (3 \, A a - B b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (3 \, A a - B b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac{2 \,{\left ({\left (3 \, A a - B b\right )} \sin \left (d x + c\right )^{3} - 2 \, B a - 2 \, A b -{\left (5 \, A a + B b\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.49354, size = 286, normalized size = 3.25 \begin{align*} \frac{{\left (3 \, A a - B b\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (3 \, A a - B b\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, B a + 4 \, A b + 2 \,{\left ({\left (3 \, A a - B b\right )} \cos \left (d x + c\right )^{2} + 2 \, A a + 2 \, B b\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27742, size = 154, normalized size = 1.75 \begin{align*} \frac{{\left (3 \, A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) -{\left (3 \, A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac{2 \,{\left (3 \, A a \sin \left (d x + c\right )^{3} - B b \sin \left (d x + c\right )^{3} - 5 \, A a \sin \left (d x + c\right ) - B b \sin \left (d x + c\right ) - 2 \, B a - 2 \, A b\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]